<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Single\Get as SingleGet;
use App\Http\Controllers\Single\Term as SingleTerm;
use App\Http\Controllers\Configuration\Cms as ConfigurationCms;

Route::prefix('v1')->group(function () {
    // post
    Route::prefix('single')->group(function () {
        Route::get('/', [SingleGet::class, 'index']);
        Route::get('/{id}', [SingleGet::class, 'single'])->where('id', '[0-9]+');
    });
    // term
    Route::prefix('term')->group(function () {
        Route::get('/', [SingleTerm::class, 'index']);
        Route::get('/{id}', [SingleTerm::class, 'show'])->where('id', '[0-9]+');
    });
    // configuration
    Route::prefix('configuration')->group(function () {
        Route::get('/cms', [ConfigurationCms::class, 'index']);
    });
});
